﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MessageCommon;
using System.Messaging;
using MessageCommon.GlobalStructure;

namespace ReceiveClient.SendMessage
{
    public class SendMSGToPCClient : SendBase
    {

        public SendMSGToPCClient()
        {

        }

        public override void SendOffLineMessage(PushMessageList msgList)
        {
            base.SendOffLineMessage(msgList);
        }

        public override void SendOnlineMessage(PushMessage msg, AddressInfo address)
        {
            MessageQueue myQueue = new
                MessageQueue(string.Format(GlobalConst.MESSAGEPATH, address.strIPAddress));
            Message message = new Message();
            message.Body = msg;
            message.UseJournalQueue = true;
            message.Recoverable = true;
            myQueue.Send(message);
        }
    }
}
